import reshandler from 'services/response-handler'
/*
 * 查询车友会活动列表
 */
function makeData(response) {
    for (let i = 0; i < response.activityList.length;i++){
        let time = response.activityList[i].beginDate
        response.activityList[i].time = time.substring(5,10)
    }
    return Object.assign({}, response, {
        activityList: response.activityList || []
    })
}
export default function (params, success, fail) {
    // request 
    params = Object.assign({}, params, {
        methodName: "ListFleetActivity",
    })

    // invoke
    this.$.get(params)
        .then(reshandler.success(success, fail, makeData), reshandler.error(fail))
}
